-
Couldn't load subscription status.
- Fork 0
Feedback #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feedback
Are you sure you want to change the base?
Feedback #1
Conversation
🤖 AI Feedback🕒 Posted on 2025-10-20T13:11:04.609Z Overall FeedbackLooks good! The implementation meets all requirements from the assignment description and passes both Previous Feedback🕒 Posted on 2025-10-20T12:27:36.762Z Overall FeedbackYour implementation shows good understanding of the requirements but contains critical logical errors affecting core functionality. Multiple tests fail due to incorrect business logic and insufficient null/edge case handling. Focus on fixing the fundamental business logic errors before addressing polish. What's Working Well
Areas for ImprovementWarehouse ClassIssue: // Incorrect
return products.values().stream()
.filter(p -> p instanceof Perishable)
.filter(p -> ((Perishable) p).isExpired())
.map(p -> (Perishable) p)Issue: public List<Shippable> shippableProducts() {
return products.values().stream()
.filter(p -> p instanceof Shippable)
.map(p -> (Shippable) p) // Replace with instanceof check
.collect(Collectors.toList());
}Product SubclassesIssue: Constructor validation order public FoodProduct(UUID id, String name, Category category, BigDecimal price, LocalDate expirationDate, BigDecimal weight) {
if (price.doubleValue() < 0) throw new IllegalArgumentException("Price cannot be negative.");
if (weight.doubleValue() < 0) throw new IllegalArgumentException("Weight cannot be negative.");
super(id, name, category, price); // Only call super after validation
this.expirationDate = expirationDate;
this.weight = weight;
}WarehouseAnalyzerIssue: Incorrect date range in public List<Perishable> findProductsExpiringWithinDays(int days) {
LocalDate today = LocalDate.now();
LocalDate end = today.plusDays(days);
return products.stream()
.filter(p -> p instanceof Perishable perishable)
.filter(p -> !perishable.expirationDate().isBefore(today))
.filter(p -> perishable.expirationDate().isBefore(end.plusDays(1))) // FIX: Include end date
.map(p -> (Perishable) p)
.collect(Collectors.toList());
}Issue: return new InventoryStatistics(
totalProducts,
totalValue,
items.isEmpty() ? BigDecimal.ZERO : totalValue.divide(BigDecimal.valueOf(items.size()), 2, RoundingMode.HALF_UP),
expiredCount,
categoryCount,
mostExpensiveProduct, // Current implementation returns null for empty list
cheapestProduct
);SummaryFix critical business logic errors in date comparisons and constructor validation first. Multiple core features won't work correctly until these fundamental issues are resolved. The most important takeaway is proper validation sequencing and correct date arithmetic. Previous Feedback🕒 Posted on 2025-10-20T12:02:08.075Z Overall FeedbackAll tests pass successfully! The implementation is complete, thorough, and correctly addresses all requirements from both BasicTest and EdgeCaseTest. Excellent work! Previous Feedback🕒 Posted on 2025-10-16T06:58:08.753Z Overall FeedbackThe submission demonstrates an excellent implementation of the warehouse kata, especially for the advanced features. The code is well-structured, thoroughly tested, and meets all requirements. The implementation of What's Working Well
Areas for Improvement1. Weighted Average Precision in
|
…finding outliers. All tests in BasicTest and EdgeCaseTest are green.
…t on IQR implementation.
…hanged to default.
Adding missing testmethods
👋! GitHub Classroom created this pull request as a place for your teacher to leave feedback on your work. It will update automatically. Don’t close or merge this pull request, unless you’re instructed to do so by your teacher.
In this pull request, your teacher can leave comments and feedback on your code. Click the Subscribe button to be notified if that happens.
Click the Files changed or Commits tab to see all of the changes pushed to the default branch since the assignment started. Your teacher can see this too.
Notes for teachers
Use this PR to leave feedback. Here are some tips:
For more information about this pull request, read “Leaving assignment feedback in GitHub”.
Subscribed: @mattknatt